#pragma once
#include "public.h"
class VirtualNDK;


class Hooker
{
public:
	Hooker(VirtualNDK* vndk, uint64_t base_addr, uint32_t size);
	~Hooker();

private:
	VirtualNDK* vndk;
	uc_hook hh;
	hook_fun hooks[500];
	uint32_t size;
	uint32_t current_id;
	uint64_t hook_magic;
	uint64_t hook_start;
	uint64_t hook_current;
public:
	uint32_t _get_next_id();
	uint64_t write_function(hook_fun func);
	static void callback_hook(uc_engine * uc, uint64_t address, uint32_t size, void * hooks);
};

